<template>
    <div class="app-container">
<!-- 感觉重复了-->
<!--        <div class="card-wrap flex-column justify-end card-padding">-->

<!--            <div class="card-title-wrap">-->
<!--                <span>车辆信息</span>-->
<!--                <span style="flex: 1"></span>-->
<!--                <span class="card-title-right">车辆状态：{{getBusinessType(carBasic.businessType)}}</span>-->
<!--            </div>-->

<!--            <el-descriptions title="">-->
<!--                <el-descriptions-item label="车架号">-->
<!--                    {{ carBasic.vinNo|filterNull }}-->
<!--                </el-descriptions-item>-->
<!--                <el-descriptions-item label="品牌/车型/车款">-->
<!--                    {{ carBasic.brandName|filterNull }}/{{ carBasic.seriesName|filterNull }}/{{ carBasic.modelName|filterNull }}-->
<!--                </el-descriptions-item>-->
<!--                <el-descriptions-item label="产权方">-->
<!--                    {{ carBasic.propertyRightName|filterNull }}-->
<!--                </el-descriptions-item>-->
<!--                <el-descriptions-item label="车辆归属">-->
<!--                    {{ carBasic.ascription|filterNull }}-->
<!--                </el-descriptions-item>-->
<!--                <el-descriptions-item label="大区">-->
<!--                    {{ carBasic.region|filterNull }}-->
<!--                </el-descriptions-item>-->
<!--                <el-descriptions-item label="运营">-->
<!--                    {{ carBasic.operationsName|filterNull }}-->
<!--                </el-descriptions-item>-->

<!--            </el-descriptions>-->

<!--        </div>-->
        <div class="card-wrap flex-column justify-end card-padding">

            <el-tabs v-model="activeName">
                <el-tab-pane label="GPS信息" name="first">

                    <el-descriptions title="基本信息"></el-descriptions>
                    <div class="basic">
                        <CarBaseInfo :form="carBasic"></CarBaseInfo>
                    </div>

<!--                    重复字段-->
<!--                    <el-descriptions title="合同信息">-->
<!--                        <el-descriptions-item label="合同禀议编号">-->
<!--                            {{ carBasic.collectUnit|filterNull }}-->
<!--                        </el-descriptions-item>-->
<!--                        <el-descriptions-item label="采购禀议编号">-->
<!--                            {{ carBasic.violationTime|filterNull }}-->
<!--                        </el-descriptions-item>-->
<!--                        <el-descriptions-item label="产品类型">-->
<!--                            {{ carBasic.violationEvent|filterNull }}-->
<!--                        </el-descriptions-item>-->
<!--                        <el-descriptions-item label="合同开始日期">-->
<!--                            {{ carBasic.penaltyPrice|filterNull }}-->
<!--                        </el-descriptions-item>-->
<!--                        <el-descriptions-item label="合同结束日期">-->
<!--                            {{ carBasic.penaltyScore|filterNull }}-->
<!--                        </el-descriptions-item>-->
<!--                        <el-descriptions-item label="客户名称">{{ carBasic.violationAddress|filterNull }}-->
<!--                        </el-descriptions-item>-->
<!--                    </el-descriptions>-->

                    <el-descriptions title="GPS信息">
                    </el-descriptions>
                    <el-table
                        border
                        :data="carGpsInstallList"
                        style="width: 100%">
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="gpsBrand" align="center"
                            label="GPS品牌">
                            <template v-slot="{row}">
                                {{ row.gpsBrand|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="equipmentType" align="center"
                            label="设备类型">
                            <template v-slot="{row}">
                                <dict-tag
                                  :options="dict.type.gps_device_type"
                                  :value="row.equipmentType"
                                />
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="130"
                            prop="equipmentNo" align="center"
                            label="设备编号">
                            <template v-slot="{row}">
                                {{ row.equipmentNo|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="130"
                            prop="sim" align="center"
                            label="SIM卡号">
                            <template v-slot="{row}">
                                {{ row.sim|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="115"
                            prop="expireTime" align="center"
                            label="GPS到期时间">
                            <template v-slot="{row}">
                                {{ row.expireTime|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="115"
                            prop="gpsServicePeriod" align="center"
                            label="设备时效">
                            <template v-slot="{row}">
                                {{ row.gpsServicePeriod|filterNull }}
                            </template>
                        </el-table-column>
                    </el-table>

                    <el-descriptions v-if="12==workType" title="GPS安装信息">
                    </el-descriptions>
                    <el-table v-if="12==workType"
                        border
                        :data="carGpsInstallList"
                        style="width: 100%">
                        <el-table-column show-overflow-tooltip min-width="115"
                            prop="installTime" align="center"
                            label="预约安装时间">
                            <template v-slot="{row}">
                                {{ row.installTime|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="gpsBrand" align="center"
                            label="GPS品牌">
                            <template v-slot="{row}">
                                {{ row.gpsBrand|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="equipmentType" align="center"
                            label="设备类型">
                            <template v-slot="{row}">
                                <dict-tag
                                      :options="dict.type.gps_device_type"
                                      :value="row.equipmentType"
                                />
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="equipmentNo" align="center"
                            label="设备编号">
                            <template v-slot="{row}">
                                {{ row.equipmentNo|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="sim" align="center"
                            label="SIM卡号">
                            <template v-slot="{row}">
                                {{ row.sim|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="installTime" align="center"
                            label="安装时间">
                            <template v-slot="{row}">
                                {{ row.installTime|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="115"
                            prop="expireTime" align="center"
                            label="GPS到期时间">
                            <template v-slot="{row}">
                                {{ row.expireTime|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="installAddress" align="center"
                            label="安装地点">
                            <template v-slot="{row}">
                                {{ row.installAddress|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="100"
                            prop="gpsPrice" align="center"
                            label="GPS金额">
                            <template v-slot="{row}">
                                {{ row.gpsPrice|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="100"
                            prop="sceneContacts" align="center"
                            label="现场联系人">
                            <template v-slot="{row}">
                                {{ row.sceneContacts|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="gpsServicePeriod" align="center"
                            label="设备时效">
                            <template v-slot="{row}">
                                {{ row.gpsServicePeriod|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="115"
                            prop="sceneContactsTel" align="center"
                            label="现场联电话">
                            <template v-slot="{row}">
                                {{ row.sceneContactsTel|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="130"
                            prop="createTime" align="center"
                            label="工单创建时间">
                            <template v-slot="{row}">
                                {{ row.createTime|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="createBy" align="center"
                            label="处理人">
                            <template v-slot="{row}">
                                {{ row.createBy|filterNull }}
                            </template>
                        </el-table-column>
                    </el-table>

                    <el-descriptions v-if="13==workType" title="GPS续费信息">
                    </el-descriptions>
                    <el-table v-if="13==workType"
                        border
                        :data="carGpsRenewList"
                        style="width: 100%">
                        <el-table-column show-overflow-tooltip min-width="115"
                            prop="renewFlag" align="center"
                            label="是否需要续费">
                            <template v-slot="{row}">
                                {{ 1==row.renewFlag?'是':2==row.renewFlag?'否':'--' }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="gpsBrand" align="center"
                            label="续费品牌">
                            <template v-slot="{row}">
                                {{ row.gpsBrand|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="renewEquipmentType" align="center"
                            label="设备类型">
                            <template v-slot="{row}">
                                <dict-tag
                                          :options="dict.type.gps_device_type"
                                          :value="row.renewEquipmentType"
                                />
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="renewEquipmentNo" align="center"
                            label="设备编号">
                            <template v-slot="{row}">
                                {{ row.renewEquipmentNo|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="renewSim" align="center"
                            label="SIM卡号">
                            <template v-slot="{row}">
                                {{ row.renewSim|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="renewYear" align="center"
                            label="续费年限">
                            <template v-slot="{row}">
                                {{ row.renewYear|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="renewPrice" align="center"
                            label="续费费用">
                            <template v-slot="{row}">
                                {{ row.renewPrice|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="130"
                            prop="renewStartTime" align="center"
                            label="续费开始时间">
                            <template v-slot="{row}">
                                {{ row.renewStartTime|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="130"
                            prop="renewEndTime" align="center"
                            label="GPS到期时间">
                            <template v-slot="{row}">
                                {{ row.renewEndTime|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="130"
                            prop="createTime" align="center"
                            label="工单创建时间">
                            <template v-slot="{row}">
                                {{ row.createTime|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="createBy" align="center"
                            label="处理人">
                            <template v-slot="{row}">
                                {{ row.createBy|filterNull }}
                            </template>
                        </el-table-column>
                    </el-table>

                    <el-descriptions v-if="14==workType" title="GPS维修信息">
                    </el-descriptions>
                    <el-table
                        border v-if="14==workType"
                        :data="carGpsMaintenanceList"
                        style="width: 100%">
                        <el-table-column show-overflow-tooltip min-width="130"
                            prop="maintenanceTime" align="center"
                            label="预约维修时间">
                            <template v-slot="{row}">
                                {{ row.maintenanceTime|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="gpsBrand" align="center"
                            label="设备品牌">
                            <template v-slot="{row}">
                                {{ row.gpsBrand|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="equipmentType" align="center"
                            label="设备类型">
                            <template v-slot="{row}">
                                <dict-tag
                                  :options="dict.type.gps_device_type"
                                  :value="row.equipmentType"
                                />
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="equipmentNo" align="center"
                            label="设备编号">
                            <template v-slot="{row}">
                                {{ row.equipmentNo|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="sim" align="center"
                            label="SIM卡号">
                            <template v-slot="{row}">
                                {{ row.sim|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="maintenanceTime" align="center"
                            label="维修时间">
                            <template v-slot="{row}">
                                {{ row.maintenanceTime|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="maintenancePrice" align="center"
                            label="维修费用">
                            <template v-slot="{row}">
                                {{ row.maintenancePrice|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="faultIssues" align="center"
                            label="故障问题">
                            <template v-slot="{row}">
                                {{ row.faultIssues|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="115"
                            prop="sceneContacts" align="center"
                            label="现场联系人">
                            <template v-slot="{row}">
                                {{ row.sceneContacts|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="115"
                            prop="sceneContactsTel" align="center"
                            label="现场联电话">
                            <template v-slot="{row}">
                                {{ row.sceneContactsTel|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="130"
                            prop="createTime" align="center"
                            label="工单创建时间">
                            <template v-slot="{row}">
                                {{ row.createTime|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="createBy" align="center"
                            label="处理人">
                            <template v-slot="{row}">
                                {{ row.createBy|filterNull }}
                            </template>
                        </el-table-column>
                    </el-table>

                    <el-descriptions v-if="15==workType" title="GPS拆除信息">
                    </el-descriptions>
                    <el-table
                        border v-if="15==workType"
                        :data="carGpsDismantleList"
                        style="width: 100%">
                        <el-table-column show-overflow-tooltip min-width="115"
                            prop="dismantleTime" align="center"
                            label="预约拆除时间">
                            <template v-slot="{row}">
                                {{ row.dismantleTime|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="115"
                            prop="gpsBrand" align="center"
                            label="拆除设备品牌">
                            <template v-slot="{row}">
                                {{ row.gpsBrand|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="equipmentType" align="center"
                            label="设备类型">
                            <template v-slot="{row}">
                                <dict-tag
                                  :options="dict.type.gps_device_type"
                                  :value="row.equipmentType"
                                />
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="equipmentNo" align="center"
                            label="设备编号">
                            <template v-slot="{row}">
                                {{ row.equipmentNo|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="sim" align="center"
                            label="SIM卡号">
                            <template v-slot="{row}">
                                {{ row.sim|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="130"
                            prop="isReuse" align="center"
                            label="拆除设备能否复用">
                            <template v-slot="{row}">
                                {{ 0==row.isReuse?'能':1==row.isReuse?'不能':'--' }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="sendUserName" align="center"
                            label="拆除时间">
                            <template v-slot="{row}">
                                {{ row.sendUserName|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="dismantleTime" align="center"
                            label="拆除费用">
                            <template v-slot="{row}">
                                {{ row.dismantleTime|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="dismantleCause" align="center"
                            label="拆除原因">
                            <template v-slot="{row}">
                                {{ row.dismantleCause|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="dismantleAddress" align="center"
                            label="拆除地点">
                            <template v-slot="{row}">
                                {{ row.dismantleAddress|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="115"
                            prop="sceneContacts" align="center"
                            label="现场联系人">
                            <template v-slot="{row}">
                                {{ row.sceneContacts|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="115"
                            prop="sceneContactsTel" align="center"
                            label="现场联电话">
                            <template v-slot="{row}">
                                {{ row.sceneContactsTel|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="130"
                            prop="createTime" align="center"
                            label="工单创建时间">
                            <template v-slot="{row}">
                                {{ row.createTime|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="createBy" align="center"
                            label="处理人">
                            <template v-slot="{row}">
                                {{ row.createBy|filterNull }}
                            </template>
                        </el-table-column>
                    </el-table>

                    <el-descriptions v-if="17==workType" title="GPS排查信息反馈">
                    </el-descriptions>
                    <el-table
                        border v-if="17==workType"
                        :data="carGpsTroubleshootList"
                        style="width: 100%">
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="gpsBrand" align="center"
                            label="设备品牌">
                            <template v-slot="{row}">
                                {{ row.gpsBrand|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="equipmentType" align="center"
                            label="设备类型">
                            <template v-slot="{row}">
                                <dict-tag
                                  :options="dict.type.gps_device_type"
                                  :value="row.equipmentType"
                                />
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="equipmentNo" align="center"
                            label="设备编号">
                            <template v-slot="{row}">
                                {{ row.equipmentNo|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="sim" align="center"
                            label="SIM卡号">
                            <template v-slot="{row}">
                                {{ row.sim|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="gpsState" align="center"
                            label="GPS状态">
                            <template v-slot="{row}">
                                <dict-tag
                                    :options="dict.type.gps_state"
                                    :value="row.gpsState"
                                />
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="130"
                            prop="dismantleTime" align="center"
                            label="状态持续时长">
                            <template v-slot="{row}">
                                {{ row.dismantleTime|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="offLineCause" align="center"
                            label="离线原因">
                            <template v-slot="{row}">
                                {{ row.offLineCause|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="alarmType" align="center"
                            label="报警类型">
                            <template v-slot="{row}">
                                <dict-tag
                                    :options="dict.type.gps_alarm_type"
                                    :value="row.alarmType"
                                />
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="alarmTime" align="center"
                            label="报警时间">
                            <template v-slot="{row}">
                                {{ row.alarmTime|filterNull }}
                            </template>
                        </el-table-column>
<!--                        <el-table-column show-overflow-tooltip min-width="115"-->
<!--                            prop="sendUserName" align="center"-->
<!--                            label="是否继续排查">-->
<!--                            <template v-slot="{row}">-->
<!--                                {{ row.sendUserName|filterNull }}-->
<!--                            </template>-->
<!--                        </el-table-column>-->
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="createTime" align="center"
                            label="反馈时间">
                            <template v-slot="{row}">
                                {{ row.createTime|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="createBy" align="center"
                            label="处理人">
                            <template v-slot="{row}">
                                {{ row.createBy|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="130"
                            prop="createTime" align="center"
                            label="工单创建时间">
                            <template v-slot="{row}">
                                {{ row.createTime|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="feedbackCause" align="center"
                            label="反馈原因">
                            <template v-slot="{row}">
                                <dict-tag
                                  :options="dict.type.gps_feedback_reason"
                                  :value="row.feedbackCause"
                                />
                            </template>
                        </el-table-column>
                    </el-table>

                    <el-descriptions title="备注">
                        <el-descriptions-item label="备注">
                            {{ carBasic.remark|filterNull }}
                        </el-descriptions-item>
                        <el-descriptions-item label="照片">
                            <ImageCommon disabled v-model="carBasic.imageOss"></ImageCommon>
                        </el-descriptions-item>
                    </el-descriptions>

                </el-tab-pane>
                <el-tab-pane label="GPS记录" name="second">

                    <el-table
                        border
                        :data="recordList"
                        style="width: 100%">
                        <el-table-column
                            type="index" label="序号" align="center"
                            width="50">
                        </el-table-column>
                        <el-table-column
                            prop="name" align="center"
                            label="操作">
                            <template v-slot="{row}">
                                <e-button size="mini" type="text" @click="goDetail(row)">查看
                                </e-button>
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="115"
                            prop="workOrderCode" align="center"
                            label="GPS工单编号">
                            <template v-slot="{row}">
                                {{ row.workOrderCode|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="115"
                            prop="workOrderType" align="center"
                            label="GPS类型">
                            <template v-slot="{row}">
                                <dict-tag
                                    :options="dict.type.gps_workorder_type"
                                    :value="row.workOrderType"/>
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="customerName" align="center"
                            label="客户名称">
                            <template v-slot="{row}">
                                {{ row.customerName|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="contractType" align="center"
                            label="产品类型">
                            <template v-slot="{row}">
                                <dict-tag
                                    :options="dict.type.quota_rent_type"
                                    :value="row.contractType"/>
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="115"
                            prop="contractStartTime" align="center"
                            label="合同开始日期">
                            <template v-slot="{row}">
                                {{ row.contractStartTime|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="115"
                            prop="contractEndTime" align="center"
                            label="合同结束日期">
                            <template v-slot="{row}">
                                {{ row.contractEndTime|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="115"
                            prop="contractReportNumber" align="center"
                            label="合同禀议编号">
                            <template v-slot="{row}">
                                {{ row.contractReportNumber|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="115"
                            prop="procurementReportNumber" align="center"
                            label="采购禀议编号">
                            <template v-slot="{row}">
                                {{ row.procurementReportNumber|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="90"
                            prop="processedByName" align="center"
                            label="处理人">
                            <template v-slot="{row}">
                                {{ row.processedByName|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="100"
                            prop="processedByTime" align="center"
                            label="处理时间">
                            <template v-slot="{row}">
                                {{ row.processedByTime|filterNull }}
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip min-width="115"
                            prop="createTime" align="center"
                            label="工单创建时间">
                            <template v-slot="{row}">
                                {{ row.createTime|filterNull }}
                            </template>
                        </el-table-column>
                    </el-table>
                </el-tab-pane>
            </el-tabs>


        </div>

        <div class="card-wrap flex justify-end card-padding">
            <el-button @click="cancel">返回</el-button>
<!--            <el-button :loading="buttonLoading" type="primary" @click="submitForm">保存</el-button>-->
        </div>

    </div>
</template>

<script>

import {carGpsManagementDetail, carGpsManagementRecord} from "@/api/gps/gpsList";
import CarBaseInfo from "@/views/GPSManage/components/carBaseInfo.vue";

export default {
    name:"GPSDeviceDetail",
    components: {CarBaseInfo},
    dicts: ['gps_device_type', 'gps_feedback_reason', 'gps_workorder_type', 'quota_rent_type', 'gps_alarm_type', 'gps_state'],
    data() {
        return {
            buttonLoading: false,
            activeName: 'first',
            form: {},
            carBasic:{},
            carGpsInstallList:[],
            carGpsMaintenanceList:[],
            carGpsRenewList:[],
            carGpsDismantleList:[],
            carGpsTroubleshootList:[],
            recordList:[],
            workType:null,
        };
    },
    watch:{
        '$route':{
            handler(val){
                console.log('this.$route', this.$route)

                if(val && val.name==this.$options.name){
                    if (this.$route.query && this.$route.query.carId && !this.$route.query.tabClick) {
                        this.getOldData(this.$route.query.carId, this.$route.query.workType);
                    }

                }
            },
            immediate:true,
            deep:true
        }
    },
    // mounted() {
    //     this.businessTypeList = businessTypeList
    //
    //     this.getOldData(this.$route.query.carId, this.$route.query.workType);
    // },
    methods: {
        // getBusinessType(type){
        //     return this.businessTypeList.find(item=> {
        //         return item.value == type
        //     })?.label??'--'
        // },

        getOldData(id, workType) {
            this.workType = workType
            carGpsManagementDetail(id, workType).then(res => {
                this.form = res.data

                this.carBasic = this.form.carBasic ?? {}
                this.carGpsInstallList = this.form.carGpsInstallList ?? []
                this.carGpsMaintenanceList = this.form.carGpsMaintenanceList ?? []
                this.carGpsRenewList = this.form.carGpsRenewList ?? []
                this.carGpsDismantleList = this.form.carGpsDismantleList ?? []
                this.carGpsTroubleshootList = this.form.carGpsTroubleshootList ?? []
            })
            carGpsManagementRecord(id).then(res=>{
                this.recordList = res.data
            })
        },

        goDetail(row) {
            this.getOldData(row.carId, row.workOrderType);
            this.activeName = 'first'

            // this.$router.push({
            //     name: 'IllegalListDetail',
            //     query: {carViolationId: row.carViolationId}
            // })
        },
        cancel(){
            this.$router.back();
this.$store.dispatch('tagsView/delView', this.$route);
        },
        // submitForm(){
        //     let that = this
        //     this.$refs["followForm"].validate(valid => {
        //         if (valid) {
        //             this.buttonLoading = true;
        //
        //             cluesFollowRecordAdd({
        //                 cluesId:that.$route.query.cluesId,
        //                 ...that.followForm
        //             }).then(res=>{
        //                 this.buttonLoading = false;
        //                 this.$modal.msgSuccess( "提交成功");
        //                 this.$router.back()
        //             }).finally(e=>{
        //                 this.buttonLoading = false;
        //             })
        //         }
        //     });
        // },
    }
};
</script>


<style lang="scss" scoped>
::v-deep .el-form--label-top .el-form-item__label {
    padding: 0;
}

::v-deep .el-form-item {
    margin-bottom: 10px !important;
    width: 70%;
}

::v-deep .el-descriptions__header {
    margin-top: -8px !important;
    margin-bottom: 10px !important;
}

::v-deep .el-table{
    margin-bottom: 20px !important;
}

::v-deep .el-tabs__item {
    font-size: 16px !important;
    //color: #333333;
    font-weight: bold;
}

.basic{
    margin: -15px 0 0;
    ::v-deep .el-descriptions-item__cell {
        padding: 7px 0 !important;
    }
}

</style>
